package com.shiyi.controller;

import com.baomidou.mybatisplus.extension.api.R;

public class Result<T> {

    private int code;
    private T data;

    private Result(int code, T data) {
        this.data = data;
        this.code = code;
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", data=" + data +
                '}';
    }

    public static <T> Result<T> data(T data){
        return new Result<>(200,data);
    }
}
